package com.zdy.im.tio.packets;

import com.sixeco.framework.common.api.ApiDesc;
import com.sixeco.framework.common.data.BaseBeanClone;
import com.sixeco.framework.util.json.JsonUtils;

import java.util.Date;

/**
 * @Author 作者 : zdy
 * @CreateDate 创建时间: 2021-02-30
 * @Version 版本: v1.0.0
 * <pre>
 *
 *  @Description (说明):  读消息协议请求对象
 *
 * </pre>
 **/

public class JoinFriendRequestVo extends BaseBeanClone {


    @ApiDesc(value = "操作用户token")
    private String token;

    /**
     * 消息来源用户名
     */
    @ApiDesc(value = "消息发送用户ID",required = 1)
    private long sendUserId;
    /**
     * 消息来源用户名
     */
    @ApiDesc(value = "消息发送用户名",required = 1)
    private String sendUserName;

    /**
     * 发送者头像
     */
    @ApiDesc(value = "消息发送者头像",required = 1)
    private String sendUserImg;

    /**
     * 发送者时间
     */
    @ApiDesc(value = "发送者时间",required = 0)
    private Date sendTime;
    /**
     * 消息的接收id
     */
    @ApiDesc(value = "消息的接收id,私聊为用户id,群聊为群id",required = 1)
    private long toId;

    /**
     * 消息的接收者名称
     */
    @ApiDesc(value = "消息的接收者名称",required = 1)
    private String toUserName;

    /**
     * 消息的接收者名称,如果是群则为空
     */
    @ApiDesc(value = "消息的接收者图片",required = 1)
    private String toUserImg;

    @ApiDesc(value = "申请原因")
    private String reasons;

    public static JoinFriendRequestVo build() {
       return new JoinFriendRequestVo();
    }


    public JoinFriendRequestVo toToken(String token) {
        this.token = token;
        return this;
    }

    public JoinFriendRequestVo toSendUserId(long sendUserId) {
        this.sendUserId = sendUserId;
        return this;
    }

    public JoinFriendRequestVo toSendUserName(String sendUserName) {
        this.sendUserName = sendUserName;
        return this;
    }

    public JoinFriendRequestVo toSendUserImg(String sendUserImg) {
        this.sendUserImg = sendUserImg;
        return this;
    }

    public JoinFriendRequestVo toSendTime(Date sendTime) {
        this.sendTime = sendTime;
        return this;
    }

    public JoinFriendRequestVo toToId(long toId) {
        this.toId = toId;
        return this;
    }

    public JoinFriendRequestVo toToUserName(String toUserName) {
        this.toUserName = toUserName;
        return this;
    }

    public JoinFriendRequestVo toToUserImg(String toUserImg) {
        this.toUserImg = toUserImg;
        return this;
    }

    public JoinFriendRequestVo toReasons(String reasons) {
        this.reasons = reasons;
        return this;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public long getSendUserId() {
        return sendUserId;
    }

    public void setSendUserId(long sendUserId) {
        this.sendUserId = sendUserId;
    }

    public String getSendUserName() {
        return sendUserName;
    }

    public void setSendUserName(String sendUserName) {
        this.sendUserName = sendUserName;
    }

    public String getSendUserImg() {
        return sendUserImg;
    }

    public void setSendUserImg(String sendUserImg) {
        this.sendUserImg = sendUserImg;
    }

    public Date getSendTime() {
        return sendTime;
    }

    public void setSendTime(Date sendTime) {
        this.sendTime = sendTime;
    }

    public long getToId() {
        return toId;
    }

    public void setToId(long toId) {
        this.toId = toId;
    }

    public String getToUserName() {
        return toUserName;
    }

    public void setToUserName(String toUserName) {
        this.toUserName = toUserName;
    }

    public String getToUserImg() {
        return toUserImg;
    }

    public void setToUserImg(String toUserImg) {
        this.toUserImg = toUserImg;
    }

    public String getReasons() {
        return reasons;
    }

    public void setReasons(String reasons) {
        this.reasons = reasons;
    }

    public static void main(String[] args) {
        JoinFriendRequestVo vo = JoinFriendRequestVo.build();
        vo.toToId(11).toToUserName("ToUserName").toToUserImg("ToUserImg")
                .toSendUserId(222).toSendUserName("toSendUserName").toSendUserImg("toSendUserImg");
        vo.toSendTime(new Date()).toToken("token").toReasons("加好友申请");
        System.out.println(JsonUtils.toJson(vo));
    }
}
